// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Cloud Storage JSON API Version v1beta1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://developers.google.com/storage/docs/json_api/'>Cloud Storage JSON API</a>
 *      <tr><th>API Version<td>v1beta1
 *      <tr><th>API Rev<td>20170224 (785)
 *      <tr><th>API Docs
 *          <td><a href='https://developers.google.com/storage/docs/json_api/'>
 *              https://developers.google.com/storage/docs/json_api/</a>
 *      <tr><th>Discovery Name<td>storage
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Cloud Storage JSON API can be found at
 * <a href='https://developers.google.com/storage/docs/json_api/'>https://developers.google.com/storage/docs/json_api/</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.Storage.v1beta1
{
    /// <summary>The Storage Service.</summary>
    public class StorageService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1beta1";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public StorageService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public StorageService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            bucketAccessControls = new BucketAccessControlsResource(this);
            buckets = new BucketsResource(this);
            objectAccessControls = new ObjectAccessControlsResource(this);
            objects = new ObjectsResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "storage"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/storage/v1beta1/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "storage/v1beta1/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Cloud Storage JSON API.</summary>
        public class Scope
        {
            /// <summary>Manage your data and permissions in Google Cloud Storage</summary>
            public static string DevstorageFullControl = "https://www.googleapis.com/auth/devstorage.full_control";

            /// <summary>View your data in Google Cloud Storage</summary>
            public static string DevstorageReadOnly = "https://www.googleapis.com/auth/devstorage.read_only";

            /// <summary>Manage your data in Google Cloud Storage</summary>
            public static string DevstorageReadWrite = "https://www.googleapis.com/auth/devstorage.read_write";

        }



        private readonly BucketAccessControlsResource bucketAccessControls;

        /// <summary>Gets the BucketAccessControls resource.</summary>
        public virtual BucketAccessControlsResource BucketAccessControls
        {
            get { return bucketAccessControls; }
        }

        private readonly BucketsResource buckets;

        /// <summary>Gets the Buckets resource.</summary>
        public virtual BucketsResource Buckets
        {
            get { return buckets; }
        }

        private readonly ObjectAccessControlsResource objectAccessControls;

        /// <summary>Gets the ObjectAccessControls resource.</summary>
        public virtual ObjectAccessControlsResource ObjectAccessControls
        {
            get { return objectAccessControls; }
        }

        private readonly ObjectsResource objects;

        /// <summary>Gets the Objects resource.</summary>
        public virtual ObjectsResource Objects
        {
            get { return objects; }
        }
    }

    ///<summary>A base abstract class for Storage requests.</summary>
    public abstract class StorageBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new StorageBaseServiceRequest instance.</summary>
        protected StorageBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes Storage parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "bucketAccessControls" collection of methods.</summary>
    public class BucketAccessControlsResource
    {
        private const string Resource = "bucketAccessControls";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public BucketAccessControlsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes the ACL entry for the specified entity on the specified bucket.</summary>
        /// <param name="bucket">Name of a bucket.</param>
        /// <param name="entity">The entity holding the permission. Can
        /// be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or
        /// allAuthenticatedUsers.</param>
        public virtual DeleteRequest Delete(string bucket, string entity)
        {
            return new DeleteRequest(service, bucket, entity);
        }

        /// <summary>Deletes the ACL entry for the specified entity on the specified bucket.</summary>
        public class DeleteRequest : StorageBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string bucket, string entity)
                : base(service)
            {
                Bucket = bucket;
                Entity = entity;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-
            /// emailAddress, allUsers, or allAuthenticatedUsers.</summary>
            [Google.Apis.Util.RequestParameterAttribute("entity", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Entity { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/acl/{entity}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "entity", new Google.Apis.Discovery.Parameter
                    {
                        Name = "entity",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Returns the ACL entry for the specified entity on the specified bucket.</summary>
        /// <param name="bucket">Name of a bucket.</param>
        /// <param name="entity">The entity holding the permission. Can
        /// be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or
        /// allAuthenticatedUsers.</param>
        public virtual GetRequest Get(string bucket, string entity)
        {
            return new GetRequest(service, bucket, entity);
        }

        /// <summary>Returns the ACL entry for the specified entity on the specified bucket.</summary>
        public class GetRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.BucketAccessControl>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string bucket, string entity)
                : base(service)
            {
                Bucket = bucket;
                Entity = entity;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-
            /// emailAddress, allUsers, or allAuthenticatedUsers.</summary>
            [Google.Apis.Util.RequestParameterAttribute("entity", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Entity { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/acl/{entity}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "entity", new Google.Apis.Discovery.Parameter
                    {
                        Name = "entity",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new ACL entry on the specified bucket.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of a bucket.</param>
        public virtual InsertRequest Insert(Google.Apis.Storage.v1beta1.Data.BucketAccessControl body, string bucket)
        {
            return new InsertRequest(service, body, bucket);
        }

        /// <summary>Creates a new ACL entry on the specified bucket.</summary>
        public class InsertRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.BucketAccessControl>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.BucketAccessControl body, string bucket)
                : base(service)
            {
                Bucket = bucket;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.BucketAccessControl Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/acl"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves ACL entries on the specified bucket.</summary>
        /// <param name="bucket">Name of a bucket.</param>
        public virtual ListRequest List(string bucket)
        {
            return new ListRequest(service, bucket);
        }

        /// <summary>Retrieves ACL entries on the specified bucket.</summary>
        public class ListRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.BucketAccessControls>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string bucket)
                : base(service)
            {
                Bucket = bucket;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/acl"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an ACL entry on the specified bucket. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of a bucket.</param>
        /// <param name="entity">The entity holding the permission. Can
        /// be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or
        /// allAuthenticatedUsers.</param>
        public virtual PatchRequest Patch(Google.Apis.Storage.v1beta1.Data.BucketAccessControl body, string bucket, string entity)
        {
            return new PatchRequest(service, body, bucket, entity);
        }

        /// <summary>Updates an ACL entry on the specified bucket. This method supports patch semantics.</summary>
        public class PatchRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.BucketAccessControl>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.BucketAccessControl body, string bucket, string entity)
                : base(service)
            {
                Bucket = bucket;
                Entity = entity;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-
            /// emailAddress, allUsers, or allAuthenticatedUsers.</summary>
            [Google.Apis.Util.RequestParameterAttribute("entity", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Entity { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.BucketAccessControl Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/acl/{entity}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "entity", new Google.Apis.Discovery.Parameter
                    {
                        Name = "entity",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an ACL entry on the specified bucket.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of a bucket.</param>
        /// <param name="entity">The entity holding the permission. Can
        /// be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or
        /// allAuthenticatedUsers.</param>
        public virtual UpdateRequest Update(Google.Apis.Storage.v1beta1.Data.BucketAccessControl body, string bucket, string entity)
        {
            return new UpdateRequest(service, body, bucket, entity);
        }

        /// <summary>Updates an ACL entry on the specified bucket.</summary>
        public class UpdateRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.BucketAccessControl>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.BucketAccessControl body, string bucket, string entity)
                : base(service)
            {
                Bucket = bucket;
                Entity = entity;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-
            /// emailAddress, allUsers, or allAuthenticatedUsers.</summary>
            [Google.Apis.Util.RequestParameterAttribute("entity", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Entity { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.BucketAccessControl Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/acl/{entity}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "entity", new Google.Apis.Discovery.Parameter
                    {
                        Name = "entity",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "buckets" collection of methods.</summary>
    public class BucketsResource
    {
        private const string Resource = "buckets";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public BucketsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes an empty bucket.</summary>
        /// <param name="bucket">Name of a bucket.</param>
        public virtual DeleteRequest Delete(string bucket)
        {
            return new DeleteRequest(service, bucket);
        }

        /// <summary>Deletes an empty bucket.</summary>
        public class DeleteRequest : StorageBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string bucket)
                : base(service)
            {
                Bucket = bucket;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Returns metadata for the specified bucket.</summary>
        /// <param name="bucket">Name of a bucket.</param>
        public virtual GetRequest Get(string bucket)
        {
            return new GetRequest(service, bucket);
        }

        /// <summary>Returns metadata for the specified bucket.</summary>
        public class GetRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.Bucket>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string bucket)
                : base(service)
            {
                Bucket = bucket;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Set of properties to return. Defaults to no_acl.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit acl and defaultObjectAcl properties.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new bucket.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual InsertRequest Insert(Google.Apis.Storage.v1beta1.Data.Bucket body)
        {
            return new InsertRequest(service, body);
        }

        /// <summary>Creates a new bucket.</summary>
        public class InsertRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.Bucket>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.Bucket body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }


            /// <summary>Set of properties to return. Defaults to no_acl, unless the bucket resource specifies acl or
            /// defaultObjectAcl properties, when it defaults to full.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl, unless the bucket resource specifies acl or
            /// defaultObjectAcl properties, when it defaults to full.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit acl and defaultObjectAcl properties.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.Bucket Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves a list of buckets for a given project.</summary>
        /// <param name="projectId">A valid API project identifier.</param>
        public virtual ListRequest List(ulong projectId)
        {
            return new ListRequest(service, projectId);
        }

        /// <summary>Retrieves a list of buckets for a given project.</summary>
        public class ListRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.Buckets>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, ulong projectId)
                : base(service)
            {
                ProjectId = projectId;
                InitParameters();
            }


            /// <summary>A valid API project identifier.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual ulong ProjectId { get; private set; }

            /// <summary>Maximum number of buckets to return.</summary>
            /// [minimum: 0]
            [Google.Apis.Util.RequestParameterAttribute("max-results", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>A previously-returned page token representing part of the larger set of results to
            /// view.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit acl and defaultObjectAcl properties.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectId",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "max-results", new Google.Apis.Discovery.Parameter
                    {
                        Name = "max-results",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a bucket. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of a bucket.</param>
        public virtual PatchRequest Patch(Google.Apis.Storage.v1beta1.Data.Bucket body, string bucket)
        {
            return new PatchRequest(service, body, bucket);
        }

        /// <summary>Updates a bucket. This method supports patch semantics.</summary>
        public class PatchRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.Bucket>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.Bucket body, string bucket)
                : base(service)
            {
                Bucket = bucket;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Set of properties to return. Defaults to full.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to full.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit acl and defaultObjectAcl properties.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.Bucket Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a bucket.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of a bucket.</param>
        public virtual UpdateRequest Update(Google.Apis.Storage.v1beta1.Data.Bucket body, string bucket)
        {
            return new UpdateRequest(service, body, bucket);
        }

        /// <summary>Updates a bucket.</summary>
        public class UpdateRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.Bucket>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.Bucket body, string bucket)
                : base(service)
            {
                Bucket = bucket;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Set of properties to return. Defaults to full.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to full.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit acl and defaultObjectAcl properties.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.Bucket Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "objectAccessControls" collection of methods.</summary>
    public class ObjectAccessControlsResource
    {
        private const string Resource = "objectAccessControls";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ObjectAccessControlsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes the ACL entry for the specified entity on the specified object.</summary>
        /// <param name="bucket">Name of a bucket.</param>
        /// <param name="storageObject">Name of the
        /// object.</param>
        /// <param name="entity">The entity holding the permission. Can be user-userId, user-
        /// emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.</param>
        public virtual DeleteRequest Delete(string bucket, string storageObject, string entity)
        {
            return new DeleteRequest(service, bucket, storageObject, entity);
        }

        /// <summary>Deletes the ACL entry for the specified entity on the specified object.</summary>
        public class DeleteRequest : StorageBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string bucket, string storageObject, string entity)
                : base(service)
            {
                Bucket = bucket;
                Object = storageObject;
                Entity = entity;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object.</summary>
            [Google.Apis.Util.RequestParameterAttribute("object", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Object { get; private set; }

            /// <summary>The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-
            /// emailAddress, allUsers, or allAuthenticatedUsers.</summary>
            [Google.Apis.Util.RequestParameterAttribute("entity", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Entity { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o/{object}/acl/{entity}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "object", new Google.Apis.Discovery.Parameter
                    {
                        Name = "object",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "entity", new Google.Apis.Discovery.Parameter
                    {
                        Name = "entity",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Returns the ACL entry for the specified entity on the specified object.</summary>
        /// <param name="bucket">Name of a bucket.</param>
        /// <param name="storageObject">Name of the
        /// object.</param>
        /// <param name="entity">The entity holding the permission. Can be user-userId, user-
        /// emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.</param>
        public virtual GetRequest Get(string bucket, string storageObject, string entity)
        {
            return new GetRequest(service, bucket, storageObject, entity);
        }

        /// <summary>Returns the ACL entry for the specified entity on the specified object.</summary>
        public class GetRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.ObjectAccessControl>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string bucket, string storageObject, string entity)
                : base(service)
            {
                Bucket = bucket;
                Object = storageObject;
                Entity = entity;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object.</summary>
            [Google.Apis.Util.RequestParameterAttribute("object", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Object { get; private set; }

            /// <summary>The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-
            /// emailAddress, allUsers, or allAuthenticatedUsers.</summary>
            [Google.Apis.Util.RequestParameterAttribute("entity", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Entity { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o/{object}/acl/{entity}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "object", new Google.Apis.Discovery.Parameter
                    {
                        Name = "object",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "entity", new Google.Apis.Discovery.Parameter
                    {
                        Name = "entity",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a new ACL entry on the specified object.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of a bucket.</param>
        /// <param name="storageObject">Name of the object.</param>
        public virtual InsertRequest Insert(Google.Apis.Storage.v1beta1.Data.ObjectAccessControl body, string bucket, string storageObject)
        {
            return new InsertRequest(service, body, bucket, storageObject);
        }

        /// <summary>Creates a new ACL entry on the specified object.</summary>
        public class InsertRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.ObjectAccessControl>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.ObjectAccessControl body, string bucket, string storageObject)
                : base(service)
            {
                Bucket = bucket;
                Object = storageObject;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object.</summary>
            [Google.Apis.Util.RequestParameterAttribute("object", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Object { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.ObjectAccessControl Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o/{object}/acl"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "object", new Google.Apis.Discovery.Parameter
                    {
                        Name = "object",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves ACL entries on the specified object.</summary>
        /// <param name="bucket">Name of a bucket.</param>
        /// <param name="storageObject">Name of the object.</param>
        public virtual ListRequest List(string bucket, string storageObject)
        {
            return new ListRequest(service, bucket, storageObject);
        }

        /// <summary>Retrieves ACL entries on the specified object.</summary>
        public class ListRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.ObjectAccessControls>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string bucket, string storageObject)
                : base(service)
            {
                Bucket = bucket;
                Object = storageObject;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object.</summary>
            [Google.Apis.Util.RequestParameterAttribute("object", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Object { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o/{object}/acl"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "object", new Google.Apis.Discovery.Parameter
                    {
                        Name = "object",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an ACL entry on the specified object. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of a bucket.</param>
        /// <param name="storageObject">Name of the
        /// object.</param>
        /// <param name="entity">The entity holding the permission. Can be user-userId, user-
        /// emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.</param>
        public virtual PatchRequest Patch(Google.Apis.Storage.v1beta1.Data.ObjectAccessControl body, string bucket, string storageObject, string entity)
        {
            return new PatchRequest(service, body, bucket, storageObject, entity);
        }

        /// <summary>Updates an ACL entry on the specified object. This method supports patch semantics.</summary>
        public class PatchRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.ObjectAccessControl>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.ObjectAccessControl body, string bucket, string storageObject, string entity)
                : base(service)
            {
                Bucket = bucket;
                Object = storageObject;
                Entity = entity;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object.</summary>
            [Google.Apis.Util.RequestParameterAttribute("object", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Object { get; private set; }

            /// <summary>The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-
            /// emailAddress, allUsers, or allAuthenticatedUsers.</summary>
            [Google.Apis.Util.RequestParameterAttribute("entity", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Entity { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.ObjectAccessControl Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o/{object}/acl/{entity}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "object", new Google.Apis.Discovery.Parameter
                    {
                        Name = "object",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "entity", new Google.Apis.Discovery.Parameter
                    {
                        Name = "entity",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates an ACL entry on the specified object.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of a bucket.</param>
        /// <param name="storageObject">Name of the
        /// object.</param>
        /// <param name="entity">The entity holding the permission. Can be user-userId, user-
        /// emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.</param>
        public virtual UpdateRequest Update(Google.Apis.Storage.v1beta1.Data.ObjectAccessControl body, string bucket, string storageObject, string entity)
        {
            return new UpdateRequest(service, body, bucket, storageObject, entity);
        }

        /// <summary>Updates an ACL entry on the specified object.</summary>
        public class UpdateRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.ObjectAccessControl>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.ObjectAccessControl body, string bucket, string storageObject, string entity)
                : base(service)
            {
                Bucket = bucket;
                Object = storageObject;
                Entity = entity;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of a bucket.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object.</summary>
            [Google.Apis.Util.RequestParameterAttribute("object", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Object { get; private set; }

            /// <summary>The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-
            /// emailAddress, allUsers, or allAuthenticatedUsers.</summary>
            [Google.Apis.Util.RequestParameterAttribute("entity", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Entity { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.ObjectAccessControl Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o/{object}/acl/{entity}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "object", new Google.Apis.Discovery.Parameter
                    {
                        Name = "object",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "entity", new Google.Apis.Discovery.Parameter
                    {
                        Name = "entity",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "objects" collection of methods.</summary>
    public class ObjectsResource
    {
        private const string Resource = "objects";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ObjectsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes data blobs and associated metadata.</summary>
        /// <param name="bucket">Name of the bucket in which the object resides.</param>
        /// <param
        /// name="storageObject">Name of the object.</param>
        public virtual DeleteRequest Delete(string bucket, string storageObject)
        {
            return new DeleteRequest(service, bucket, storageObject);
        }

        /// <summary>Deletes data blobs and associated metadata.</summary>
        public class DeleteRequest : StorageBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string bucket, string storageObject)
                : base(service)
            {
                Bucket = bucket;
                Object = storageObject;
                InitParameters();
            }


            /// <summary>Name of the bucket in which the object resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object.</summary>
            [Google.Apis.Util.RequestParameterAttribute("object", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Object { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o/{object}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "object", new Google.Apis.Discovery.Parameter
                    {
                        Name = "object",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves objects or their associated metadata.</summary>
        /// <param name="bucket">Name of the bucket in which the object resides.</param>
        /// <param
        /// name="storageObject">Name of the object.</param>
        public virtual GetRequest Get(string bucket, string storageObject)
        {
            return new GetRequest(service, bucket, storageObject);
        }

        /// <summary>Retrieves objects or their associated metadata.</summary>
        public class GetRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.Object>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string bucket, string storageObject)
                : base(service)
            {
                Bucket = bucket;
                Object = storageObject;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>Name of the bucket in which the object resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object.</summary>
            [Google.Apis.Util.RequestParameterAttribute("object", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Object { get; private set; }

            /// <summary>Set of properties to return. Defaults to no_acl.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit the acl property.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o/{object}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "object", new Google.Apis.Discovery.Parameter
                    {
                        Name = "object",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }

        /// <summary>Stores new data blobs and associated metadata.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of the bucket in which to store the new object. Overrides the provided object metadata's
        /// bucket value, if any.</param>
        public virtual InsertRequest Insert(Google.Apis.Storage.v1beta1.Data.Object body, string bucket)
        {
            return new InsertRequest(service, body, bucket);
        }

        /// <summary>Stores new data blobs and associated metadata.</summary>
        public class InsertRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.Object>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.Object body, string bucket)
                : base(service)
            {
                Bucket = bucket;
                Body = body;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>Name of the bucket in which to store the new object. Overrides the provided object metadata's
            /// bucket value, if any.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object. Required when the object metadata is not otherwise provided. Overrides the
            /// object metadata's name value, if any.</summary>
            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Name { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl, unless the object resource specifies the acl
            /// property, when it defaults to full.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl, unless the object resource specifies the acl
            /// property, when it defaults to full.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit the acl property.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.Object Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "name", new Google.Apis.Discovery.Parameter
                    {
                        Name = "name",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }

        /// <summary>Stores new data blobs and associated metadata.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of the bucket in which to store the new object. Overrides the provided object metadata's
        /// bucket value, if any.</param>
        /// <param name="stream">The stream to upload.</param>
        /// <param name="contentType">The content type of the stream to upload.</param>
        public virtual InsertMediaUpload Insert(Google.Apis.Storage.v1beta1.Data.Object body, string bucket, System.IO.Stream stream, string contentType)
        {
            return new InsertMediaUpload(service, body, bucket, stream, contentType);
        }

        /// <summary>Insert media upload which supports resumable upload.</summary>
        public class InsertMediaUpload : Google.Apis.Upload.ResumableUpload<Google.Apis.Storage.v1beta1.Data.Object, Google.Apis.Storage.v1beta1.Data.Object>
        {

            /// <summary>Data format for the response.</summary>
            /// [default: json]
            [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<AltEnum> Alt { get; set; }

            /// <summary>Data format for the response.</summary>
            public enum AltEnum
            {
                /// <summary>Responses with Content-Type of application/json</summary>
                [Google.Apis.Util.StringValueAttribute("json")]
                Json,
            }

            /// <summary>Selector specifying which fields to include in a partial response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Fields { get; set; }

            /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and
            /// reports. Required unless you provide an OAuth 2.0 token.</summary>
            [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Key { get; set; }

            /// <summary>OAuth 2.0 token for the current user.</summary>
            [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string OauthToken { get; set; }

            /// <summary>Returns response with indentations and line breaks.</summary>
            /// [default: true]
            [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> PrettyPrint { get; set; }

            /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
            /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are
            /// provided.</summary>
            [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string QuotaUser { get; set; }

            /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
            /// limits.</summary>
            [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string UserIp { get; set; }


            /// <summary>Name of the bucket in which to store the new object. Overrides the provided object metadata's
            /// bucket value, if any.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object. Required when the object metadata is not otherwise provided. Overrides the
            /// object metadata's name value, if any.</summary>
            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Name { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl, unless the object resource specifies the acl
            /// property, when it defaults to full.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl, unless the object resource specifies the acl
            /// property, when it defaults to full.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit the acl property.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }

            /// <summary>Constructs a new Insert media upload instance.</summary>
            public InsertMediaUpload(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.Object body, string
             bucket, System.IO.Stream stream, string contentType)
                : base(service, string.Format("/{0}/{1}{2}", "upload", service.BasePath, "b/{bucket}/o"), "POST", stream, contentType)
            {
                Bucket = bucket;
                Body = body;
            }
        }

        /// <summary>Retrieves a list of objects matching the criteria.</summary>
        /// <param name="bucket">Name of the bucket in which to look for objects.</param>
        public virtual ListRequest List(string bucket)
        {
            return new ListRequest(service, bucket);
        }

        /// <summary>Retrieves a list of objects matching the criteria.</summary>
        public class ListRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.Objects>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string bucket)
                : base(service)
            {
                Bucket = bucket;
                InitParameters();
            }


            /// <summary>Name of the bucket in which to look for objects.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Returns results in a directory-like mode. items will contain only objects whose names, aside
            /// from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter
            /// will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are
            /// omitted.</summary>
            [Google.Apis.Util.RequestParameterAttribute("delimiter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Delimiter { get; set; }

            /// <summary>Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total
            /// results may be returned than requested.</summary>
            /// [minimum: 0]
            [Google.Apis.Util.RequestParameterAttribute("max-results", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }

            /// <summary>A previously-returned page token representing part of the larger set of results to
            /// view.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }

            /// <summary>Filter results to objects whose names begin with this prefix.</summary>
            [Google.Apis.Util.RequestParameterAttribute("prefix", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Prefix { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to no_acl.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit the acl property.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "delimiter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "delimiter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "max-results", new Google.Apis.Discovery.Parameter
                    {
                        Name = "max-results",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "prefix", new Google.Apis.Discovery.Parameter
                    {
                        Name = "prefix",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a data blob's associated metadata. This method supports patch semantics.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of the bucket in which the object resides.</param>
        /// <param
        /// name="storageObject">Name of the object.</param>
        public virtual PatchRequest Patch(Google.Apis.Storage.v1beta1.Data.Object body, string bucket, string storageObject)
        {
            return new PatchRequest(service, body, bucket, storageObject);
        }

        /// <summary>Updates a data blob's associated metadata. This method supports patch semantics.</summary>
        public class PatchRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.Object>
        {
            /// <summary>Constructs a new Patch request.</summary>
            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.Object body, string bucket, string storageObject)
                : base(service)
            {
                Bucket = bucket;
                Object = storageObject;
                Body = body;
                InitParameters();
            }


            /// <summary>Name of the bucket in which the object resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object.</summary>
            [Google.Apis.Util.RequestParameterAttribute("object", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Object { get; private set; }

            /// <summary>Set of properties to return. Defaults to full.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to full.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit the acl property.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.Object Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "patch"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PATCH"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o/{object}"; }
            }

            /// <summary>Initializes Patch parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "object", new Google.Apis.Discovery.Parameter
                    {
                        Name = "object",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a data blob's associated metadata.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="bucket">Name of the bucket in which the object resides.</param>
        /// <param
        /// name="storageObject">Name of the object.</param>
        public virtual UpdateRequest Update(Google.Apis.Storage.v1beta1.Data.Object body, string bucket, string storageObject)
        {
            return new UpdateRequest(service, body, bucket, storageObject);
        }

        /// <summary>Updates a data blob's associated metadata.</summary>
        public class UpdateRequest : StorageBaseServiceRequest<Google.Apis.Storage.v1beta1.Data.Object>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Storage.v1beta1.Data.Object body, string bucket, string storageObject)
                : base(service)
            {
                Bucket = bucket;
                Object = storageObject;
                Body = body;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>Name of the bucket in which the object resides.</summary>
            [Google.Apis.Util.RequestParameterAttribute("bucket", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Bucket { get; private set; }

            /// <summary>Name of the object.</summary>
            [Google.Apis.Util.RequestParameterAttribute("object", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Object { get; private set; }

            /// <summary>Set of properties to return. Defaults to full.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projection", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<ProjectionEnum> Projection { get; set; }

            /// <summary>Set of properties to return. Defaults to full.</summary>
            public enum ProjectionEnum
            {
                /// <summary>Include all properties.</summary>
                [Google.Apis.Util.StringValueAttribute("full")]
                Full,
                /// <summary>Omit the acl property.</summary>
                [Google.Apis.Util.StringValueAttribute("no_acl")]
                NoAcl,
            }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Storage.v1beta1.Data.Object Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "b/{bucket}/o/{object}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "bucket", new Google.Apis.Discovery.Parameter
                    {
                        Name = "bucket",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "object", new Google.Apis.Discovery.Parameter
                    {
                        Name = "object",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "projection", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projection",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }
    }
}

namespace Google.Apis.Storage.v1beta1.Data
{    

    /// <summary>A bucket.</summary>
    public class Bucket : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Access controls on the bucket.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("acl")]
        public virtual System.Collections.Generic.IList<BucketAccessControl> Acl { get; set; } 

        /// <summary>Default access controls to apply to new objects when no ACL is provided.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("defaultObjectAcl")]
        public virtual System.Collections.Generic.IList<ObjectAccessControl> DefaultObjectAcl { get; set; } 

        /// <summary>The name of the bucket.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>The kind of item this is. For buckets, this is always storage#bucket.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The location of the bucket. Object data for objects in the bucket resides in physical storage in
        /// this location. Can be US or EU. Defaults to US.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("location")]
        public virtual string Location { get; set; } 

        /// <summary>The owner of the bucket. This will always be the project team's owner group.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("owner")]
        public virtual Bucket.OwnerData Owner { get; set; } 

        /// <summary>The project the bucket belongs to.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("projectId")]
        public virtual System.Nullable<ulong> ProjectId { get; set; } 

        /// <summary>The URI of this bucket.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>Creation time of the bucket in RFC 3339 format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("timeCreated")]
        public virtual string TimeCreatedRaw { get; set; }

        /// <summary><seealso cref="System.DateTime"/> representation of <see cref="TimeCreatedRaw"/>.</summary>
        [Newtonsoft.Json.JsonIgnore]
        public virtual System.Nullable<System.DateTime> TimeCreated
        {
            get
            {
                return Google.Apis.Util.Utilities.GetDateTimeFromString(TimeCreatedRaw);
            }
            set
            {
                TimeCreatedRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
            }
        }

        /// <summary>The bucket's website configuration.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("website")]
        public virtual Bucket.WebsiteData Website { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>The owner of the bucket. This will always be the project team's owner group.</summary>
        public class OwnerData
        {
            /// <summary>The entity, in the form group-groupId.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("entity")]
            public virtual string Entity { get; set; } 

            /// <summary>The ID for the entity.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("entityId")]
            public virtual string EntityId { get; set; } 

        }    

        /// <summary>The bucket's website configuration.</summary>
        public class WebsiteData
        {
            /// <summary>Behaves as the bucket's directory index where missing objects are treated as potential
            /// directories.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("mainPageSuffix")]
            public virtual string MainPageSuffix { get; set; } 

            /// <summary>The custom object to return when a requested resource is not found.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("notFoundPage")]
            public virtual string NotFoundPage { get; set; } 

        }
    }    

    /// <summary>An access-control entry.</summary>
    public class BucketAccessControl : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The name of the bucket.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bucket")]
        public virtual string Bucket { get; set; } 

        /// <summary>The domain associated with the entity, if any.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domain")]
        public virtual string Domain { get; set; } 

        /// <summary>The email address associated with the entity, if any.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("email")]
        public virtual string Email { get; set; } 

        /// <summary>The entity holding the permission, in one of the following forms: - user-userId - user-email -
        /// group-groupId - group-email - domain-domain - allUsers - allAuthenticatedUsers Examples: - The user
        /// liz@example.com would be user-liz@example.com. - The group example@googlegroups.com would be group-
        /// example@googlegroups.com. - To refer to all members of the Google Apps for Business domain example.com, the
        /// entity would be domain-example.com.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("entity")]
        public virtual string Entity { get; set; } 

        /// <summary>The ID for the entity, if any.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("entityId")]
        public virtual string EntityId { get; set; } 

        /// <summary>The ID of the access-control entry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>The kind of item this is. For bucket access control entries, this is always
        /// storage#bucketAccessControl.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The access permission for the entity. Can be READER, WRITER, or OWNER.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("role")]
        public virtual string Role { get; set; } 

        /// <summary>The link to this access-control entry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An access-control list.</summary>
    public class BucketAccessControls : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of items.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<BucketAccessControl> Items { get; set; } 

        /// <summary>The kind of item this is. For lists of bucket access control entries, this is always
        /// storage#bucketAccessControls.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A list of buckets.</summary>
    public class Buckets : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of items.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Bucket> Items { get; set; } 

        /// <summary>The kind of item this is. For lists of buckets, this is always storage#buckets.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The continuation token, used to page through large result sets. Provide this value in a subsequent
        /// request to return the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An object.</summary>
    public class Object : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Access controls on the object.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("acl")]
        public virtual System.Collections.Generic.IList<ObjectAccessControl> Acl { get; set; } 

        /// <summary>The bucket containing this object.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bucket")]
        public virtual string Bucket { get; set; } 

        /// <summary>Cache-Control directive for the object data.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cacheControl")]
        public virtual string CacheControl { get; set; } 

        /// <summary>Content-Disposition of the object data.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("contentDisposition")]
        public virtual string ContentDisposition { get; set; } 

        /// <summary>Content-Encoding of the object data.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("contentEncoding")]
        public virtual string ContentEncoding { get; set; } 

        /// <summary>Content-Language of the object data.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("contentLanguage")]
        public virtual string ContentLanguage { get; set; } 

        /// <summary>The ID of the object.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>The kind of item this is. For objects, this is always storage#object.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Object media data. Provided on your behalf when uploading raw media or multipart/related with an
        /// auxiliary media part.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("media")]
        public virtual Object.MediaData Media { get; set; } 

        /// <summary>User-provided metadata, in key/value pairs.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metadata")]
        public virtual System.Collections.Generic.IDictionary<string,string> Metadata { get; set; } 

        /// <summary>The name of this object. Required if not specified by URL parameter.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The owner of the object. This will always be the uploader of the object.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("owner")]
        public virtual Object.OwnerData Owner { get; set; } 

        /// <summary>The link to this object.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>Object media data. Provided on your behalf when uploading raw media or multipart/related with an
        /// auxiliary media part.</summary>
        public class MediaData
        {
            /// <summary>Hash algorithm used. Currently only MD5 is supported. Required if a hash is provided.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("algorithm")]
            public virtual string Algorithm { get; set; } 

            /// <summary>Content-Type of the object data.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("contentType")]
            public virtual string ContentType { get; set; } 

            /// <summary>URL-safe Base64-encoded data. This property can be used to insert objects under 64KB in size,
            /// and will only be returned in response to the get method for objects so created. When this resource is
            /// returned in response to the list method, this property is omitted.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("data")]
            public virtual string Data { get; set; } 

            /// <summary>Hash of the data. Required if a hash algorithm is provided.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("hash")]
            public virtual string Hash { get; set; } 

            /// <summary>Content-Length of the data in bytes.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("length")]
            public virtual System.Nullable<ulong> Length { get; set; } 

            /// <summary>Media download link.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("link")]
            public virtual string Link { get; set; } 

            /// <summary>Creation time of the data in RFC 3339 format.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("timeCreated")]
            public virtual string TimeCreatedRaw { get; set; }

            /// <summary><seealso cref="System.DateTime"/> representation of <see cref="TimeCreatedRaw"/>.</summary>
            [Newtonsoft.Json.JsonIgnore]
            public virtual System.Nullable<System.DateTime> TimeCreated
            {
                get
                {
                    return Google.Apis.Util.Utilities.GetDateTimeFromString(TimeCreatedRaw);
                }
                set
                {
                    TimeCreatedRaw = Google.Apis.Util.Utilities.GetStringFromDateTime(value);
                }
            }

        }    

        /// <summary>The owner of the object. This will always be the uploader of the object.</summary>
        public class OwnerData
        {
            /// <summary>The entity, in the form user-userId.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("entity")]
            public virtual string Entity { get; set; } 

            /// <summary>The ID for the entity.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("entityId")]
            public virtual string EntityId { get; set; } 

        }
    }    

    /// <summary>An access-control entry.</summary>
    public class ObjectAccessControl : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The name of the bucket.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bucket")]
        public virtual string Bucket { get; set; } 

        /// <summary>The domain associated with the entity, if any.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("domain")]
        public virtual string Domain { get; set; } 

        /// <summary>The email address associated with the entity, if any.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("email")]
        public virtual string Email { get; set; } 

        /// <summary>The entity holding the permission, in one of the following forms: - user-userId - user-email -
        /// group-groupId - group-email - domain-domain - allUsers - allAuthenticatedUsers Examples: - The user
        /// liz@example.com would be user-liz@example.com. - The group example@googlegroups.com would be group-
        /// example@googlegroups.com. - To refer to all members of the Google Apps for Business domain example.com, the
        /// entity would be domain-example.com.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("entity")]
        public virtual string Entity { get; set; } 

        /// <summary>The ID for the entity, if any.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("entityId")]
        public virtual string EntityId { get; set; } 

        /// <summary>The ID of the access-control entry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>The kind of item this is. For object access control entries, this is always
        /// storage#objectAccessControl.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The name of the object.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("object")]
        public virtual string Object__ { get; set; } 

        /// <summary>The access permission for the entity. Can be READER or OWNER.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("role")]
        public virtual string Role { get; set; } 

        /// <summary>The link to this access-control entry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An access-control list.</summary>
    public class ObjectAccessControls : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of items.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<ObjectAccessControl> Items { get; set; } 

        /// <summary>The kind of item this is. For lists of object access control entries, this is always
        /// storage#objectAccessControls.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A list of objects.</summary>
    public class Objects : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of items.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Object> Items { get; set; } 

        /// <summary>The kind of item this is. For lists of objects, this is always storage#objects.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The continuation token, used to page through large result sets. Provide this value in a subsequent
        /// request to return the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The list of prefixes of objects matching-but-not-listed up to and including the requested
        /// delimiter.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("prefixes")]
        public virtual System.Collections.Generic.IList<string> Prefixes { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
